﻿@(Html.Telerik().DatePicker()
    .Name("DatePickerDepartDate0")
    .HtmlAttributes(new { id = "DatePickerDepartDate_wrapper0", @class = "input datetime", required = "required", type = "datetime" })
    .Min(@DateTime.Now)
    .ShowButton(true)
    .OpenOnFocus(true)
    .Format("dd/MM/yyyy")
        .ClientEvents(events => events.OnOpen("onOpenDatePicker"))
)
@(Html.Telerik().DatePicker()
    .Name("DatePickerDepartDate1")
    .HtmlAttributes(new { id = "DatePickerDepartDate_wrapper1", @class = "input datetime", required = "required", type = "datetime" })
    .Min(@DateTime.Now)
    .ShowButton(false)
    .OpenOnFocus(true)
    .Format("dd/MM/yyyy")
)
@(Html.Telerik().DatePicker()
    .Name("DatePickerDepartDate2")
    .HtmlAttributes(new { id = "DatePickerDepartDate_wrapper2", @class = "input datetime", required = "required", type = "datetime" })
    .Min(@DateTime.Now)
    .ShowButton(false)
    .OpenOnFocus(true)
    .Format("dd/MM/yyyy")
)
<script>
    function onOpenDatePicker() {
        var datePicker = $("#DatePickerDepartDate_wrapper1").data("tDatePicker");
        //datePicker.open();
    }
</script>